package yongjian.drp.dao.Impl;

import java.util.List;

import javax.annotation.Resource;

import org.hibernate.SessionFactory;
import org.springframework.stereotype.Component;

import yongjian.drp.dao.AimClientDao;
import yongjian.drp.model.AimClient;

@Component("aimClientDao")
public class AimClientDaoImpl implements AimClientDao{
	
	private SessionFactory sessionFactory;
	
	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}
	@Resource
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
		
	@Override
	public List<AimClient> getAllRecord() {		
		return (List<AimClient>)sessionFactory.getCurrentSession().createQuery("from AimClient").list();
	}	
	

}
